package pile.pay.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
 * <p>
 * 用户充值表
 * </p>
 *
 * @author 郭天义
 * @since 2024-06-28
 */
@Getter
@Setter
@TableName("sys_recharge")
@ApiModel(value = "Recharge对象", description = "用户充值表")
public class Recharge implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("充值id")
    @TableId(value = "recharge_id", type = IdType.AUTO)
    private Integer rechargeId;

    @ApiModelProperty("用户id")
    private Integer memberId;

    @ApiModelProperty("微信支付商户id")
    private String mchId;

    @ApiModelProperty("充值订单id")
    private String rechargeOrderNo;

    @ApiModelProperty("电站id")
    private Integer stationId;

    @ApiModelProperty("第三方订单号")
    private String thirdOrderNumber;

    @ApiModelProperty("充值金额")
    private BigDecimal rechargeAmount;

    @ApiModelProperty("剩余金额")
    private BigDecimal remainingAmount;

    @ApiModelProperty("分账金额")
    private BigDecimal ledgerAmount;

    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount;

    @ApiModelProperty("充值类型 0充值余额   1/充值充电金 2/占位支付 ")
    private Integer rechargeType;

    @ApiModelProperty("退款状态 0/未退款  1/退款成功  2/退款中 3/退款失败")
    private Integer refundStatus;

    @ApiModelProperty("分账状态 0/未分账  1/分账成功  2/分账中 3/分账失败")
    private Integer ledgerStatus;

    @ApiModelProperty("是否充电 0/未充电  1/已充电")
    private Integer isCharge;

    @ApiModelProperty("充值状态 0/未支付  1/已支付")
    private Integer paymentStatus;

    @ApiModelProperty("是否删除 1/是， 0/否")
    @TableLogic
    private Integer isDelete;

    @ApiModelProperty("添加时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("支付时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date paymentTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("删除时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date deleteTime;

    @ApiModelProperty("乐观锁")
    @Version
    private Integer version;

    @ApiModelProperty("充电单号 /交易流水号")
    private String startChargeSeq;

    @ApiModelProperty("金额占比")
    private BigDecimal amountProportion;

    @ApiModelProperty("渠道 1/卫莱电微信小程序  2/卫莱电支付宝小程序 3/阿凡电微信小程序 4/阿凡电支付宝小程序")
    private Integer channel;

    @ApiModelProperty("0未统计 1已统计")
    private Integer isStatistics;

    @ApiModelProperty("分账时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date ledgerTime;

    @ApiModelProperty("是否结算 1未结算  2 已结算  0 不知道")
    private Integer isSettlement;

    @ApiModelProperty("赠送金额")
    private BigDecimal giveAmount;

    @ApiModelProperty("支付的商户号")
    private String partyOrderId;

    @ApiModelProperty("支付渠道  1/微信  2/支付宝 3/汇付微信 4/汇付支付宝")
    private Integer paymentChannel;


}
